import type { AppRouteRecordRaw } from '@/router/types';
import { LAYOUT } from '@/router/constant';
import { t } from '@/hooks/web/useI18n';
// import { useMinecraftStore } from '@/store/modules/minecraft';
// import { computed } from 'vue';

// const minecraftStore = useMinecraftStore();
// const routes = computed(() => minecraftStore.getRoutes);
// console.log('routes:', routes);

const minecraft: AppRouteRecordRaw = {
  path: '/minecraft',
  name: 'Minecraft',
  component: LAYOUT,
  redirect: '/minecraft/index',
  meta: {
    title: '我的世界',
    icon: 'material-symbols:eye-tracking-outline',
    orderNo: 3,
    hideBreadcrumb: false,
    hideChildrenInMenu: false,
    hideMenu: false,
  },
  children: [
    {
      path: 'index',
      name: 'Minecraft',
      component: () => import('@/views/minecraft/index.vue'),
      meta: {
        title: t('routes.demo.minecraft.minecraft'),
        hideMenu: false,
      },
    },
    // ...routes.map((item) => ({
    //   path: 'weight',
    //   name: 'Weight',
    //   component: () => import('@/views/minecraft/jsonPage.vue'),
    //   meta: {
    //     title: '体重',
    //     hideMenu: false,
    //   },
    // })),
  ],
};

export default minecraft;
